<script setup lang="ts">
import ButtonGroup from '@/components/EditItems/ButtonGroup.vue'
import type { VueComType } from '@/types'
import { inject ,ref} from 'vue'
import { EditorType, EditorTypeText } from '@/constants'
const props = defineProps<{
  currentStatus: number;
  status: string[];
  isShow: boolean;
  configKey: EditorType;
  editCom: VueComType;
}>();

const updateStatus = inject('updateStatus');

const updateCurrentStatus = (status: number) => {
  updateStatus(props.configKey, status);
}

</script>

<template>
  <div class="size-editor">
    <button-group :title="EditorTypeText[configKey]" :description="status[currentStatus]">
      <el-button-group>
        <el-button
          :class="{
          select: currentStatus === 0,
        }"
          @click="updateCurrentStatus(0)"
        >
          <font-awesome-icon icon="bold" size="lg" />
        </el-button>
        <el-button
          :class="{
          select: currentStatus === 1,
        }"
          @click="updateCurrentStatus(1)"
        >
          <font-awesome-icon icon="bold" size="xs" />
        </el-button>
      </el-button-group>
    </button-group>
  </div>
</template>

<style scoped lang="scss">

</style>
